// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
// the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
// an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
// specific language governing permissions and limitations under the License.

//------------------------------------------------------------------------------
// <auto-generated>
//     This code was generated by google-apis-code-generator 1.5.1
//     C# generator version: 1.22.0
//
//     Changes to this file may cause incorrect behavior and will be lost if
//     the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------

/**
 * \brief
 *   DoubleClick Bid Manager API Version v1
 *
 * \section ApiInfo API Version Information
 *    <table>
 *      <tr><th>API
 *          <td><a href='https://developers.google.com/bid-manager/'>DoubleClick Bid Manager API</a>
 *      <tr><th>API Version<td>v1
 *      <tr><th>API Rev<td>20170224 (785)
 *      <tr><th>API Docs
 *          <td><a href='https://developers.google.com/bid-manager/'>
 *              https://developers.google.com/bid-manager/</a>
 *      <tr><th>Discovery Name<td>doubleclickbidmanager
 *    </table>
 *
 * \section ForMoreInfo For More Information
 *
 * The complete API documentation for using DoubleClick Bid Manager API can be found at
 * <a href='https://developers.google.com/bid-manager/'>https://developers.google.com/bid-manager/</a>.
 *
 * For more information about the Google APIs Client Library for .NET, see
 * <a href='https://developers.google.com/api-client-library/dotnet/get_started'>
 * https://developers.google.com/api-client-library/dotnet/get_started</a>
 */

namespace Google.Apis.DoubleClickBidManager.v1
{
    /// <summary>The DoubleClickBidManager Service.</summary>
    public class DoubleClickBidManagerService : Google.Apis.Services.BaseClientService
    {
        /// <summary>The API version.</summary>
        public const string Version = "v1";

        /// <summary>The discovery version used to generate this service.</summary>
        public static Google.Apis.Discovery.DiscoveryVersion DiscoveryVersionUsed =
            Google.Apis.Discovery.DiscoveryVersion.Version_1_0;

        /// <summary>Constructs a new service.</summary>
        public DoubleClickBidManagerService() :
            this(new Google.Apis.Services.BaseClientService.Initializer()) {}

        /// <summary>Constructs a new service.</summary>
        /// <param name="initializer">The service initializer.</param>
        public DoubleClickBidManagerService(Google.Apis.Services.BaseClientService.Initializer initializer)
            : base(initializer)
        {
            lineitems = new LineitemsResource(this);
            queries = new QueriesResource(this);
            reports = new ReportsResource(this);
            sdf = new SdfResource(this);
        }

        /// <summary>Gets the service supported features.</summary>
        public override System.Collections.Generic.IList<string> Features
        {
            get { return new string[0]; }
        }

        /// <summary>Gets the service name.</summary>
        public override string Name
        {
            get { return "doubleclickbidmanager"; }
        }

        /// <summary>Gets the service base URI.</summary>
        public override string BaseUri
        {
            get { return "https://www.googleapis.com/doubleclickbidmanager/v1/"; }
        }

        /// <summary>Gets the service base path.</summary>
        public override string BasePath
        {
            get { return "doubleclickbidmanager/v1/"; }
        }





        private readonly LineitemsResource lineitems;

        /// <summary>Gets the Lineitems resource.</summary>
        public virtual LineitemsResource Lineitems
        {
            get { return lineitems; }
        }

        private readonly QueriesResource queries;

        /// <summary>Gets the Queries resource.</summary>
        public virtual QueriesResource Queries
        {
            get { return queries; }
        }

        private readonly ReportsResource reports;

        /// <summary>Gets the Reports resource.</summary>
        public virtual ReportsResource Reports
        {
            get { return reports; }
        }

        private readonly SdfResource sdf;

        /// <summary>Gets the Sdf resource.</summary>
        public virtual SdfResource Sdf
        {
            get { return sdf; }
        }
    }

    ///<summary>A base abstract class for DoubleClickBidManager requests.</summary>
    public abstract class DoubleClickBidManagerBaseServiceRequest<TResponse> : Google.Apis.Requests.ClientServiceRequest<TResponse>
    {
        ///<summary>Constructs a new DoubleClickBidManagerBaseServiceRequest instance.</summary>
        protected DoubleClickBidManagerBaseServiceRequest(Google.Apis.Services.IClientService service)
            : base(service)
        {
        }

        /// <summary>Data format for the response.</summary>
        /// [default: json]
        [Google.Apis.Util.RequestParameterAttribute("alt", Google.Apis.Util.RequestParameterType.Query)]
        public virtual System.Nullable<AltEnum> Alt { get; set; }

        /// <summary>Data format for the response.</summary>
        public enum AltEnum
        {
            /// <summary>Responses with Content-Type of application/json</summary>
            [Google.Apis.Util.StringValueAttribute("json")]
            Json,
        }

        /// <summary>Selector specifying which fields to include in a partial response.</summary>
        [Google.Apis.Util.RequestParameterAttribute("fields", Google.Apis.Util.RequestParameterType.Query)]
        public virtual string Fields { get; set; }

        /// <summary>API key. Your API key identifies your project and provides you with API access, quota, and reports.
        /// Required unless you provide an OAuth 2.0 token.</summary>
        [Google.Apis.Util.RequestParameterAttribute("key", Google.Apis.Util.RequestParameterType.Query)]
        public virtual string Key { get; set; }

        /// <summary>OAuth 2.0 token for the current user.</summary>
        [Google.Apis.Util.RequestParameterAttribute("oauth_token", Google.Apis.Util.RequestParameterType.Query)]
        public virtual string OauthToken { get; set; }

        /// <summary>Returns response with indentations and line breaks.</summary>
        /// [default: true]
        [Google.Apis.Util.RequestParameterAttribute("prettyPrint", Google.Apis.Util.RequestParameterType.Query)]
        public virtual System.Nullable<bool> PrettyPrint { get; set; }

        /// <summary>Available to use for quota purposes for server-side applications. Can be any arbitrary string
        /// assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.</summary>
        [Google.Apis.Util.RequestParameterAttribute("quotaUser", Google.Apis.Util.RequestParameterType.Query)]
        public virtual string QuotaUser { get; set; }

        /// <summary>IP address of the site where the request originates. Use this if you want to enforce per-user
        /// limits.</summary>
        [Google.Apis.Util.RequestParameterAttribute("userIp", Google.Apis.Util.RequestParameterType.Query)]
        public virtual string UserIp { get; set; }

        /// <summary>Initializes DoubleClickBidManager parameter list.</summary>
        protected override void InitParameters()
        {
            base.InitParameters();

            RequestParameters.Add(
                "alt", new Google.Apis.Discovery.Parameter
                {
                    Name = "alt",
                    IsRequired = false,
                    ParameterType = "query",
                    DefaultValue = "json",
                    Pattern = null,
                });
            RequestParameters.Add(
                "fields", new Google.Apis.Discovery.Parameter
                {
                    Name = "fields",
                    IsRequired = false,
                    ParameterType = "query",
                    DefaultValue = null,
                    Pattern = null,
                });
            RequestParameters.Add(
                "key", new Google.Apis.Discovery.Parameter
                {
                    Name = "key",
                    IsRequired = false,
                    ParameterType = "query",
                    DefaultValue = null,
                    Pattern = null,
                });
            RequestParameters.Add(
                "oauth_token", new Google.Apis.Discovery.Parameter
                {
                    Name = "oauth_token",
                    IsRequired = false,
                    ParameterType = "query",
                    DefaultValue = null,
                    Pattern = null,
                });
            RequestParameters.Add(
                "prettyPrint", new Google.Apis.Discovery.Parameter
                {
                    Name = "prettyPrint",
                    IsRequired = false,
                    ParameterType = "query",
                    DefaultValue = "true",
                    Pattern = null,
                });
            RequestParameters.Add(
                "quotaUser", new Google.Apis.Discovery.Parameter
                {
                    Name = "quotaUser",
                    IsRequired = false,
                    ParameterType = "query",
                    DefaultValue = null,
                    Pattern = null,
                });
            RequestParameters.Add(
                "userIp", new Google.Apis.Discovery.Parameter
                {
                    Name = "userIp",
                    IsRequired = false,
                    ParameterType = "query",
                    DefaultValue = null,
                    Pattern = null,
                });
        }
    }

    /// <summary>The "lineitems" collection of methods.</summary>
    public class LineitemsResource
    {
        private const string Resource = "lineitems";

        /// <summary>The service which this resource belongs to.</summary>
        private readonly Google.Apis.Services.IClientService service;

        /// <summary>Constructs a new resource.</summary>
        public LineitemsResource(Google.Apis.Services.IClientService service)
        {
            this.service = service;

        }


        /// <summary>Retrieves line items in CSV format.</summary>
        /// <param name="body">The body of the request.</param>
        public virtual DownloadlineitemsRequest Downloadlineitems(Google.Apis.DoubleClickBidManager.v1.Data.DownloadLineItemsRequest body)
        {
            return new DownloadlineitemsRequest(service, body);
        }

        /// <summary>Retrieves line items in CSV format.</summary>
        public class DownloadlineitemsRequest : DoubleClickBidManagerBaseServiceRequest<Google.Apis.DoubleClickBidManager.v1.Data.DownloadLineItemsResponse>
        {
            /// <summary>Constructs a new Downloadlineitems request.</summary>
            public DownloadlineitemsRequest(Google.Apis.Services.IClientService service, Google.Apis.DoubleClickBidManager.v1.Data.DownloadLineItemsRequest body)
                : base(service)
            {
                Body = body;
                InitParameters();
            }



            /// <summary>Gets or sets the body of this request.</summary>
            Google.Apis.DoubleClickBidManager.v1.Data.DownloadLineItemsRequest Body { get; set; }

            ///<summary>Returns the body of the request.</summary>
            protected override object GetBody() { return Body; }

            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "downloadlineitems"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "POST"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "lineitems/downloadlineitems"; }
            }

            /// <summary>Initializes Downloadlineitems parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

            }

        }

        /// <summary>Uploads line items in CSV format.</summary>
        /// <param name="body">The body of the request.</param>
        public virtual UploadlineitemsRequest Uploadlineitems(Google.Apis.DoubleClickBidManager.v1.Data.UploadLineItemsRequest body)
        {
            return new UploadlineitemsRequest(service, body);
        }

        /// <summary>Uploads line items in CSV format.</summary>
        public class UploadlineitemsRequest : DoubleClickBidManagerBaseServiceRequest<Google.Apis.DoubleClickBidManager.v1.Data.UploadLineItemsResponse>
        {
            /// <summary>Constructs a new Uploadlineitems request.</summary>
            public UploadlineitemsRequest(Google.Apis.Services.IClientService service, Google.Apis.DoubleClickBidManager.v1.Data.UploadLineItemsRequest body)
                : base(service)
            {
                Body = body;
                InitParameters();
            }



            /// <summary>Gets or sets the body of this request.</summary>
            Google.Apis.DoubleClickBidManager.v1.Data.UploadLineItemsRequest Body { get; set; }

            ///<summary>Returns the body of the request.</summary>
            protected override object GetBody() { return Body; }

            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "uploadlineitems"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "POST"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "lineitems/uploadlineitems"; }
            }

            /// <summary>Initializes Uploadlineitems parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

            }

        }
    }

    /// <summary>The "queries" collection of methods.</summary>
    public class QueriesResource
    {
        private const string Resource = "queries";

        /// <summary>The service which this resource belongs to.</summary>
        private readonly Google.Apis.Services.IClientService service;

        /// <summary>Constructs a new resource.</summary>
        public QueriesResource(Google.Apis.Services.IClientService service)
        {
            this.service = service;

        }


        /// <summary>Creates a query.</summary>
        /// <param name="body">The body of the request.</param>
        public virtual CreatequeryRequest Createquery(Google.Apis.DoubleClickBidManager.v1.Data.Query body)
        {
            return new CreatequeryRequest(service, body);
        }

        /// <summary>Creates a query.</summary>
        public class CreatequeryRequest : DoubleClickBidManagerBaseServiceRequest<Google.Apis.DoubleClickBidManager.v1.Data.Query>
        {
            /// <summary>Constructs a new Createquery request.</summary>
            public CreatequeryRequest(Google.Apis.Services.IClientService service, Google.Apis.DoubleClickBidManager.v1.Data.Query body)
                : base(service)
            {
                Body = body;
                InitParameters();
            }



            /// <summary>Gets or sets the body of this request.</summary>
            Google.Apis.DoubleClickBidManager.v1.Data.Query Body { get; set; }

            ///<summary>Returns the body of the request.</summary>
            protected override object GetBody() { return Body; }

            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "createquery"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "POST"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "query"; }
            }

            /// <summary>Initializes Createquery parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

            }

        }

        /// <summary>Deletes a stored query as well as the associated stored reports.</summary>
        /// <param name="queryId">Query ID to delete.</param>
        public virtual DeletequeryRequest Deletequery(long queryId)
        {
            return new DeletequeryRequest(service, queryId);
        }

        /// <summary>Deletes a stored query as well as the associated stored reports.</summary>
        public class DeletequeryRequest : DoubleClickBidManagerBaseServiceRequest<string>
        {
            /// <summary>Constructs a new Deletequery request.</summary>
            public DeletequeryRequest(Google.Apis.Services.IClientService service, long queryId)
                : base(service)
            {
                QueryId = queryId;
                InitParameters();
            }


            /// <summary>Query ID to delete.</summary>
            [Google.Apis.Util.RequestParameterAttribute("queryId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual long QueryId { get; private set; }


            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "deletequery"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "DELETE"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "query/{queryId}"; }
            }

            /// <summary>Initializes Deletequery parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "queryId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "queryId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Retrieves a stored query.</summary>
        /// <param name="queryId">Query ID to retrieve.</param>
        public virtual GetqueryRequest Getquery(long queryId)
        {
            return new GetqueryRequest(service, queryId);
        }

        /// <summary>Retrieves a stored query.</summary>
        public class GetqueryRequest : DoubleClickBidManagerBaseServiceRequest<Google.Apis.DoubleClickBidManager.v1.Data.Query>
        {
            /// <summary>Constructs a new Getquery request.</summary>
            public GetqueryRequest(Google.Apis.Services.IClientService service, long queryId)
                : base(service)
            {
                QueryId = queryId;
                InitParameters();
            }


            /// <summary>Query ID to retrieve.</summary>
            [Google.Apis.Util.RequestParameterAttribute("queryId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual long QueryId { get; private set; }


            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "getquery"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "GET"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "query/{queryId}"; }
            }

            /// <summary>Initializes Getquery parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "queryId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "queryId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Retrieves stored queries.</summary>
        public virtual ListqueriesRequest Listqueries()
        {
            return new ListqueriesRequest(service);
        }

        /// <summary>Retrieves stored queries.</summary>
        public class ListqueriesRequest : DoubleClickBidManagerBaseServiceRequest<Google.Apis.DoubleClickBidManager.v1.Data.ListQueriesResponse>
        {
            /// <summary>Constructs a new Listqueries request.</summary>
            public ListqueriesRequest(Google.Apis.Services.IClientService service)
                : base(service)
            {
                InitParameters();
            }



            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "listqueries"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "GET"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "queries"; }
            }

            /// <summary>Initializes Listqueries parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

            }

        }

        /// <summary>Runs a stored query to generate a report.</summary>
        /// <param name="body">The body of the request.</param>
        /// <param name="queryId">Query ID to run.</param>
        public virtual RunqueryRequest Runquery(Google.Apis.DoubleClickBidManager.v1.Data.RunQueryRequest body, long queryId)
        {
            return new RunqueryRequest(service, body, queryId);
        }

        /// <summary>Runs a stored query to generate a report.</summary>
        public class RunqueryRequest : DoubleClickBidManagerBaseServiceRequest<string>
        {
            /// <summary>Constructs a new Runquery request.</summary>
            public RunqueryRequest(Google.Apis.Services.IClientService service, Google.Apis.DoubleClickBidManager.v1.Data.RunQueryRequest body, long queryId)
                : base(service)
            {
                QueryId = queryId;
                Body = body;
                InitParameters();
            }


            /// <summary>Query ID to run.</summary>
            [Google.Apis.Util.RequestParameterAttribute("queryId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual long QueryId { get; private set; }


            /// <summary>Gets or sets the body of this request.</summary>
            Google.Apis.DoubleClickBidManager.v1.Data.RunQueryRequest Body { get; set; }

            ///<summary>Returns the body of the request.</summary>
            protected override object GetBody() { return Body; }

            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "runquery"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "POST"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "query/{queryId}"; }
            }

            /// <summary>Initializes Runquery parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "queryId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "queryId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }
    }

    /// <summary>The "reports" collection of methods.</summary>
    public class ReportsResource
    {
        private const string Resource = "reports";

        /// <summary>The service which this resource belongs to.</summary>
        private readonly Google.Apis.Services.IClientService service;

        /// <summary>Constructs a new resource.</summary>
        public ReportsResource(Google.Apis.Services.IClientService service)
        {
            this.service = service;

        }


        /// <summary>Retrieves stored reports.</summary>
        /// <param name="queryId">Query ID with which the reports are associated.</param>
        public virtual ListreportsRequest Listreports(long queryId)
        {
            return new ListreportsRequest(service, queryId);
        }

        /// <summary>Retrieves stored reports.</summary>
        public class ListreportsRequest : DoubleClickBidManagerBaseServiceRequest<Google.Apis.DoubleClickBidManager.v1.Data.ListReportsResponse>
        {
            /// <summary>Constructs a new Listreports request.</summary>
            public ListreportsRequest(Google.Apis.Services.IClientService service, long queryId)
                : base(service)
            {
                QueryId = queryId;
                InitParameters();
            }


            /// <summary>Query ID with which the reports are associated.</summary>
            [Google.Apis.Util.RequestParameterAttribute("queryId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual long QueryId { get; private set; }


            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "listreports"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "GET"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "queries/{queryId}/reports"; }
            }

            /// <summary>Initializes Listreports parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "queryId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "queryId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }
    }

    /// <summary>The "sdf" collection of methods.</summary>
    public class SdfResource
    {
        private const string Resource = "sdf";

        /// <summary>The service which this resource belongs to.</summary>
        private readonly Google.Apis.Services.IClientService service;

        /// <summary>Constructs a new resource.</summary>
        public SdfResource(Google.Apis.Services.IClientService service)
        {
            this.service = service;

        }


        /// <summary>Retrieves entities in SDF format.</summary>
        /// <param name="body">The body of the request.</param>
        public virtual DownloadRequest Download(Google.Apis.DoubleClickBidManager.v1.Data.DownloadRequest body)
        {
            return new DownloadRequest(service, body);
        }

        /// <summary>Retrieves entities in SDF format.</summary>
        public class DownloadRequest : DoubleClickBidManagerBaseServiceRequest<Google.Apis.DoubleClickBidManager.v1.Data.DownloadResponse>
        {
            /// <summary>Constructs a new Download request.</summary>
            public DownloadRequest(Google.Apis.Services.IClientService service, Google.Apis.DoubleClickBidManager.v1.Data.DownloadRequest body)
                : base(service)
            {
                Body = body;
                InitParameters();
            }



            /// <summary>Gets or sets the body of this request.</summary>
            Google.Apis.DoubleClickBidManager.v1.Data.DownloadRequest Body { get; set; }

            ///<summary>Returns the body of the request.</summary>
            protected override object GetBody() { return Body; }

            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "download"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "POST"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "sdf/download"; }
            }

            /// <summary>Initializes Download parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

            }

        }
    }
}

namespace Google.Apis.DoubleClickBidManager.v1.Data
{    

    /// <summary>Request to fetch stored line items.</summary>
    public class DownloadLineItemsRequest : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>File specification (column names, types, order) in which the line items will be returned. Default
        /// to EWF.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("fileSpec")]
        public virtual string FileSpec { get; set; } 

        /// <summary>Ids of the specified filter type used to filter line items to fetch. If omitted, all the line items
        /// will be returned.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("filterIds")]
        public virtual System.Collections.Generic.IList<System.Nullable<long>> FilterIds { get; set; } 

        /// <summary>Filter type used to filter line items to fetch.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("filterType")]
        public virtual string FilterType { get; set; } 

        /// <summary>Format in which the line items will be returned. Default to CSV.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("format")]
        public virtual string Format { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>Download line items response.</summary>
    public class DownloadLineItemsResponse : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>Retrieved line items in CSV format. Refer to  Entity Write File Format or  Structured Data File
        /// Format for more information on file formats.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("lineItems")]
        public virtual string LineItems { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>Request to fetch stored insertion orders, line items, TrueView ad groups and ads.</summary>
    public class DownloadRequest : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>File types that will be returned.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("fileTypes")]
        public virtual System.Collections.Generic.IList<string> FileTypes { get; set; } 

        /// <summary>The IDs of the specified filter type. This is used to filter entities to fetch. At least one ID
        /// must be specified. Only one ID is allowed for the ADVERTISER_ID filter type. For INSERTION_ORDER_ID or
        /// LINE_ITEM_ID filter types, all IDs must be from the same Advertiser.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("filterIds")]
        public virtual System.Collections.Generic.IList<System.Nullable<long>> FilterIds { get; set; } 

        /// <summary>Filter type used to filter line items to fetch.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("filterType")]
        public virtual string FilterType { get; set; } 

        /// <summary>SDF Version (column names, types, order) in which the entities will be returned. Default to
        /// 3.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("version")]
        public virtual string Version { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>Download response.</summary>
    public class DownloadResponse : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>Retrieved ad groups in SDF format.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("adGroups")]
        public virtual string AdGroups { get; set; } 

        /// <summary>Retrieved ads in SDF format.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("ads")]
        public virtual string Ads { get; set; } 

        /// <summary>Retrieved insertion orders in SDF format.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("insertionOrders")]
        public virtual string InsertionOrders { get; set; } 

        /// <summary>Retrieved line items in SDF format.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("lineItems")]
        public virtual string LineItems { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>Filter used to match traffic data in your report.</summary>
    public class FilterPair : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>Filter type.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("type")]
        public virtual string Type { get; set; } 

        /// <summary>Filter value.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("value")]
        public virtual string Value { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>List queries response.</summary>
    public class ListQueriesResponse : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>Identifies what kind of resource this is. Value: the fixed string
        /// "doubleclickbidmanager#listQueriesResponse".</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; } 

        /// <summary>Retrieved queries.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("queries")]
        public virtual System.Collections.Generic.IList<Query> Queries { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>List reports response.</summary>
    public class ListReportsResponse : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>Identifies what kind of resource this is. Value: the fixed string
        /// "doubleclickbidmanager#listReportsResponse".</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; } 

        /// <summary>Retrieved reports.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("reports")]
        public virtual System.Collections.Generic.IList<Report> Reports { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>Parameters of a query or report.</summary>
    public class Parameters : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>Filters used to match traffic data in your report.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("filters")]
        public virtual System.Collections.Generic.IList<FilterPair> Filters { get; set; } 

        /// <summary>Data is grouped by the filters listed in this field.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("groupBys")]
        public virtual System.Collections.Generic.IList<string> GroupBys { get; set; } 

        /// <summary>Whether to include data from Invite Media.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("includeInviteData")]
        public virtual System.Nullable<bool> IncludeInviteData { get; set; } 

        /// <summary>Metrics to include as columns in your report.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("metrics")]
        public virtual System.Collections.Generic.IList<string> Metrics { get; set; } 

        /// <summary>Report type.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("type")]
        public virtual string Type { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>Represents a query.</summary>
    public class Query : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>Identifies what kind of resource this is. Value: the fixed string
        /// "doubleclickbidmanager#query".</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; } 

        /// <summary>Query metadata.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("metadata")]
        public virtual QueryMetadata Metadata { get; set; } 

        /// <summary>Query parameters.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("params")]
        public virtual Parameters Params__ { get; set; } 

        /// <summary>Query ID.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("queryId")]
        public virtual System.Nullable<long> QueryId { get; set; } 

        /// <summary>The ending time for the data that is shown in the report. Note, reportDataEndTimeMs is required if
        /// metadata.dataRange is CUSTOM_DATES and ignored otherwise.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("reportDataEndTimeMs")]
        public virtual System.Nullable<long> ReportDataEndTimeMs { get; set; } 

        /// <summary>The starting time for the data that is shown in the report. Note, reportDataStartTimeMs is required
        /// if metadata.dataRange is CUSTOM_DATES and ignored otherwise.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("reportDataStartTimeMs")]
        public virtual System.Nullable<long> ReportDataStartTimeMs { get; set; } 

        /// <summary>Information on how often and when to run a query.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("schedule")]
        public virtual QuerySchedule Schedule { get; set; } 

        /// <summary>Canonical timezone code for report data time. Defaults to America/New_York.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("timezoneCode")]
        public virtual string TimezoneCode { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>Query metadata.</summary>
    public class QueryMetadata : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>Range of report data.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("dataRange")]
        public virtual string DataRange { get; set; } 

        /// <summary>Format of the generated report.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("format")]
        public virtual string Format { get; set; } 

        /// <summary>The path to the location in Google Cloud Storage where the latest report is stored.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("googleCloudStoragePathForLatestReport")]
        public virtual string GoogleCloudStoragePathForLatestReport { get; set; } 

        /// <summary>The path in Google Drive for the latest report.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("googleDrivePathForLatestReport")]
        public virtual string GoogleDrivePathForLatestReport { get; set; } 

        /// <summary>The time when the latest report started to run.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("latestReportRunTimeMs")]
        public virtual System.Nullable<long> LatestReportRunTimeMs { get; set; } 

        /// <summary>Locale of the generated reports. Valid values are cs CZECH de GERMAN en ENGLISH es SPANISH fr
        /// FRENCH it ITALIAN ja JAPANESE ko KOREAN pl POLISH pt-BR BRAZILIAN_PORTUGUESE ru RUSSIAN tr TURKISH uk
        /// UKRAINIAN zh-CN CHINA_CHINESE zh-TW TAIWAN_CHINESE
        ///
        /// An locale string not in the list above will generate reports in English.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("locale")]
        public virtual string Locale { get; set; } 

        /// <summary>Number of reports that have been generated for the query.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("reportCount")]
        public virtual System.Nullable<int> ReportCount { get; set; } 

        /// <summary>Whether the latest report is currently running.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("running")]
        public virtual System.Nullable<bool> Running { get; set; } 

        /// <summary>Whether to send an email notification when a report is ready. Default to false.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("sendNotification")]
        public virtual System.Nullable<bool> SendNotification { get; set; } 

        /// <summary>List of email addresses which are sent email notifications when the report is finished. Separate
        /// from sendNotification.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("shareEmailAddress")]
        public virtual System.Collections.Generic.IList<string> ShareEmailAddress { get; set; } 

        /// <summary>Query title. It is used to name the reports generated from this query.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("title")]
        public virtual string Title { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>Information on how frequently and when to run a query.</summary>
    public class QuerySchedule : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>Datetime to periodically run the query until.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("endTimeMs")]
        public virtual System.Nullable<long> EndTimeMs { get; set; } 

        /// <summary>How often the query is run.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("frequency")]
        public virtual string Frequency { get; set; } 

        /// <summary>Time of day at which a new report will be generated, represented as minutes past midnight. Range is
        /// 0 to 1439. Only applies to scheduled reports.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("nextRunMinuteOfDay")]
        public virtual System.Nullable<int> NextRunMinuteOfDay { get; set; } 

        /// <summary>Canonical timezone code for report generation time. Defaults to America/New_York.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("nextRunTimezoneCode")]
        public virtual string NextRunTimezoneCode { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>Represents a report.</summary>
    public class Report : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>Key used to identify a report.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("key")]
        public virtual ReportKey Key { get; set; } 

        /// <summary>Report metadata.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("metadata")]
        public virtual ReportMetadata Metadata { get; set; } 

        /// <summary>Report parameters.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("params")]
        public virtual Parameters Params__ { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>An explanation of a report failure.</summary>
    public class ReportFailure : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>Error code that shows why the report was not created.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("errorCode")]
        public virtual string ErrorCode { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>Key used to identify a report.</summary>
    public class ReportKey : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>Query ID.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("queryId")]
        public virtual System.Nullable<long> QueryId { get; set; } 

        /// <summary>Report ID.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("reportId")]
        public virtual System.Nullable<long> ReportId { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>Report metadata.</summary>
    public class ReportMetadata : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>The path to the location in Google Cloud Storage where the report is stored.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("googleCloudStoragePath")]
        public virtual string GoogleCloudStoragePath { get; set; } 

        /// <summary>The ending time for the data that is shown in the report.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("reportDataEndTimeMs")]
        public virtual System.Nullable<long> ReportDataEndTimeMs { get; set; } 

        /// <summary>The starting time for the data that is shown in the report.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("reportDataStartTimeMs")]
        public virtual System.Nullable<long> ReportDataStartTimeMs { get; set; } 

        /// <summary>Report status.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("status")]
        public virtual ReportStatus Status { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>Report status.</summary>
    public class ReportStatus : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>If the report failed, this records the cause.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("failure")]
        public virtual ReportFailure Failure { get; set; } 

        /// <summary>The time when this report either completed successfully or failed.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("finishTimeMs")]
        public virtual System.Nullable<long> FinishTimeMs { get; set; } 

        /// <summary>The file type of the report.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("format")]
        public virtual string Format { get; set; } 

        /// <summary>The state of the report.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("state")]
        public virtual string State { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>Represents the upload status of a row in the request.</summary>
    public class RowStatus : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>Whether the stored entity is changed as a result of upload.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("changed")]
        public virtual System.Nullable<bool> Changed { get; set; } 

        /// <summary>Entity Id.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("entityId")]
        public virtual System.Nullable<long> EntityId { get; set; } 

        /// <summary>Entity name.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("entityName")]
        public virtual string EntityName { get; set; } 

        /// <summary>Reasons why the entity can't be uploaded.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("errors")]
        public virtual System.Collections.Generic.IList<string> Errors { get; set; } 

        /// <summary>Whether the entity is persisted.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("persisted")]
        public virtual System.Nullable<bool> Persisted { get; set; } 

        /// <summary>Row number.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("rowNumber")]
        public virtual System.Nullable<int> RowNumber { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>Request to run a stored query to generate a report.</summary>
    public class RunQueryRequest : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>Report data range used to generate the report.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("dataRange")]
        public virtual string DataRange { get; set; } 

        /// <summary>The ending time for the data that is shown in the report. Note, reportDataEndTimeMs is required if
        /// dataRange is CUSTOM_DATES and ignored otherwise.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("reportDataEndTimeMs")]
        public virtual System.Nullable<long> ReportDataEndTimeMs { get; set; } 

        /// <summary>The starting time for the data that is shown in the report. Note, reportDataStartTimeMs is required
        /// if dataRange is CUSTOM_DATES and ignored otherwise.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("reportDataStartTimeMs")]
        public virtual System.Nullable<long> ReportDataStartTimeMs { get; set; } 

        /// <summary>Canonical timezone code for report data time. Defaults to America/New_York.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("timezoneCode")]
        public virtual string TimezoneCode { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>Request to upload line items.</summary>
    public class UploadLineItemsRequest : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>Set to true to get upload status without actually persisting the line items.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("dryRun")]
        public virtual System.Nullable<bool> DryRun { get; set; } 

        /// <summary>Format the line items are in. Default to CSV.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("format")]
        public virtual string Format { get; set; } 

        /// <summary>Line items in CSV to upload. Refer to  Entity Write File Format for more information on file
        /// format.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("lineItems")]
        public virtual string LineItems { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>Upload line items response.</summary>
    public class UploadLineItemsResponse : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>Status of upload.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("uploadStatus")]
        public virtual UploadStatus UploadStatus { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>Represents the status of upload.</summary>
    public class UploadStatus : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>Reasons why upload can't be completed.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("errors")]
        public virtual System.Collections.Generic.IList<string> Errors { get; set; } 

        /// <summary>Per-row upload status.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("rowStatus")]
        public virtual System.Collections.Generic.IList<RowStatus> RowStatus { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }
}
